import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex)

const state = {
    systemStateOfMenuList: [] ,// 系统展示状态列表
    // tempActiveData: {}, // 当前选中的组件
    curCellId: '' // 当前操作的单元格
};

const getters = { // 实时监听state值的变化(最新状态)
    getSystemStateOfMenuList(state) {
        return state.systemStateOfMenuList;
    }
};
const mutations = {
    // 系统展示状态列表
    setSystemStateOfMenuList(state, data) {
        state.systemStateOfMenuList = data;
    },
    // setTempActiveData(state, data) {
    //     // console.log('setTempActiveData~~~~~~~~~', data);
    //     state.tempActiveData = data;
    // },
    setCurCellId(state, data) {
        state.curCellId = data;
    },
};
const actions = {};
const modules = {};
export default new Vuex.Store({
    state,
    getters,
    mutations,
    actions,
    modules: {
        modules
    }
})
